new Vue({
    el: '#app',
    mounted: function() {
        var This = this;
        setTimeout(function() {
            new MobileSelect({
                trigger: ".change-city",
                title: "地区选择",
                triggerDisplayData: false,
                wheels: [{ data: ADDRESS }],
                callback: function(indexArr, data) {
                    This.sendAddress = data;
                }
            });
        }, 500);
    },
    data: {
        //控制优惠卷
        offVoucher: false,
        //控制分享的图标
        offShareIcon: false,
        //控制分享的内容
        offShareContent: false,
        heaIconJson: {
            left: './static/img/icon-list.png',
            middle: "<span style='text-align:center;font-size:32px;'>礼盒花束</span>",
            right1: false,
            right2: './static/img/icon-shopping.png'
        },
        //分类下面那一栏的数据
        goodsTitle: {
            title: 'SDJKHFJKSD FAHJKSDKF',
            notice: '今日推荐',
            month: 'Swedsfa',
            year: '2018',
            date: '28'
        },
        //推荐商品数据
        goodsInfo: [{
            img: 'https://img.thebeastshop.com/image/20180918173031174479.jpg@4e_0o_0l_345h_330w_90q.jpg',
            badge: 'Bio-E',
            name: '天然柠檬麦卢卡酵素 500ml',
            price: '139.00',
            explain: '海外购'
        }, {
            img: 'https://img.thebeastshop.com/image/20180918173031174479.jpg@4e_0o_0l_345h_330w_90q.jpg',
            badge: 'Bio-E',
            name: '天然柠檬麦卢卡酵素 500ml',
            price: '139.00',
            explain: '海外购'
        }, {
            img: 'https://img.thebeastshop.com/image/20180918173031174479.jpg@4e_0o_0l_345h_330w_90q.jpg',
            badge: 'Bio-E',
            name: '天然柠檬麦卢卡酵素 500ml',
            price: '139.00',
            explain: '海外购'
        }, {
            img: 'https://img.thebeastshop.com/image/20180918173031174479.jpg@4e_0o_0l_345h_330w_90q.jpg',
            badge: 'Bio-E',
            name: '天然柠檬麦卢卡酵素 500ml',
            price: '139.00',
            explain: '海外购'
        }],
        //商品图片数据
        goodsImg: ['//img.alicdn.com/imgextra/i3/3910428038/TB2bbn2rv5TBuNjSspmXXaDRVXa_!!3910428038.jpg_640x0q85s150_.webp', '//img.alicdn.com/imgextra/i2/3910428038/TB2VhY6rr9YBuNjy0FgXXcxcXXa_!!3910428038.jpg_640x0q85s150_.webp', '//img.alicdn.com/imgextra/i2/3910428038/TB2VmqSscj_B1NjSZFHXXaDWpXa_!!3910428038.jpg_640x0q85s150_.webp', '//img.alicdn.com/imgextra/i3/3910428038/TB2jhZhGQKWBuNjy1zjXXcOypXa_!!3910428038.jpg_640x0q85s150_.webp', '//img.alicdn.com/imgextra/i2/3910428038/TB2WOVykfuSBuNkHFqDXXXfhVXa_!!3910428038.jpg_640x0q85s150_.webp', '//img.alicdn.com/imgextra/i2/3910428038/TB2L8uPsuOSBuNjy0FdXXbDnVXa_!!3910428038.jpg_640x0q85s150_.webp', '//img.alicdn.com/imgextra/i2/3910428038/TB2CM56sAOWBuNjSsppXXXPgpXa_!!3910428038.jpg_640x0q85s150_.webp'],
        //用户的收获地址
        sendAddress: [],
    },
    methods: {
        //商品详情页没有right1
        right2: function() {
            window.location.href = HREF + 'index.html';
        },
        //左下角查看购物车
        likeCar: function() {
            window.location.href = HREF + 'my-shopping-car.html';
        },
        //加入购物车
        addCar: function() {
            alert('加入购物车');
        },
        //立即购买
        pay: function() {
            // alert('立即购买');
            window.location.href = HREF + 'submit-order.html';
        },
        //领取优惠卷
        getVoucher: function() {
            alert('领取优惠卷');
        },
        //打开分享弹窗
        openShare: function() {
            this.offShareIcon = true;
            var This = this;
            setTimeout(function() {
                This.offShareContent = true;
            }, 200);
        }
    }
});